/*输入字符串，使用set统计各字符出现的个数，并且按照字符的ASCII码值输出*/
#include <iostream>
using namespace std;
#include <map>
#include <set>

class Data
{
    friend ostream&operator <<(ostream out,const Data&d);
private:
    char ch;
    int cout;
public:
    Data(char ch,int cout=1)
    :ch(ch),cout(cout){}
    ~Data(){}
    bool operator<(const Data&rhs)const;
    void coutAdd()const
    {
        //const_cast<>()  去掉一个const对象的const属性
        Data *p=const_cast<Data*const>(this);
        p->cout++;
    }
};

ostream&operator <<(ostream out,const Data&d)
{
    cout<<d.ch<<":"<<d.cout;
    return out;
}

bool Data::operator<(const Data&rhs)const
{
    return this->ch <rhs.ch;
}


int main(int argc,char **argv)
{
    string s;
    set<Data> mySet;
    cout<<"input:";
    cin>>s;
    for(string::iterator it=s.begin();it !=s.end();it++)
    {
        Data d(*it);
        mySet.insert(d);
        pair<set<Data>
    }
    for(set<Data>)
    return 0;
}
